package com.woniuxy.woniuticket.movieinfomodule.service.impl;

import com.woniuxy.woniuticket.movieinfomodule.dao.ProblemOfFeedbackDAO;
import com.woniuxy.woniuticket.movieinfomodule.service.ProblemOfFeedbackService;
import com.woniuxy.woniuticket.pojo.ProblemOfFeedback;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zyf
 * @Description:TODO
 * @date 2019/6/13
 * @Version 1.0
 */
@Service
public class ProblemOfFeedbackServiceImp implements ProblemOfFeedbackService {
    @Resource
    private ProblemOfFeedbackDAO problemOfFeedbackDAO;
    @Override
    public List<ProblemOfFeedback> showAllProblemOfFeedback() {
        List<ProblemOfFeedback>  list =  problemOfFeedbackDAO.qureyAllProblem();
        return list;
    }

    @Override
    public String deleProblem(Integer problemId) {
        problemOfFeedbackDAO.deleProlemBySingleId(problemId);
        return "success";
    }
    //更新反馈信息为已处理
    @Override
    public String updateProblem(Integer problemId) {
        problemOfFeedbackDAO.updateProById(problemId);
        return "success";
    }
    //添加反馈信息
    @Override
    public String  addProblem(ProblemOfFeedback problemOfFeedback) {

        problemOfFeedbackDAO.insertProblem(problemOfFeedback);
        return "success";
    }
}
